package com.hqd.ch03.v20.aop.support;

import com.hqd.ch03.v20.aop.ClassFilter;
import com.hqd.ch03.v20.aop.Pointcut;
import com.hqd.ch03.v20.aopalliance.aop.Advice;

public class NameMatchMethodPointcutAdvisor extends AbstractGenericPointcutAdvisor {
    private final NameMatchMethodPointcut pointcut = new NameMatchMethodPointcut();


    public NameMatchMethodPointcutAdvisor() {
    }

    public NameMatchMethodPointcutAdvisor(Advice advice) {
        setAdvice(advice);
    }

    public void setClassFilter(ClassFilter classFilter) {
        this.pointcut.setClassFilter(classFilter);
    }


    public NameMatchMethodPointcut addMethodName(String name) {
        return this.pointcut.addMethodName(name);
    }

    public Pointcut getPointcut() {
        return this.pointcut;
    }
}
